
$(function() {
	
	$("input[id^='emp_']").autocomplete(Test.emp);

	$("input[id^='t1_']:visible").datepicker({
		numberOfMonths: 2,
		dateFormat: 'yy-mm-dd',
		showButtonPanel: true
	});

	$("input[id^='t2_']:visible").datepicker({
		numberOfMonths: 2,
		dateFormat: 'yy-mm-dd',
		showButtonPanel: true
	});
	
	$("input[id^='date']:visible").datepicker(_date1_option);	
	$("input[id^='date']:visible").css("width", 85);
	
	$("input[id^='time_c_']:visible").click(function() {
		var label = $("label[id^='label_time_']:visible");
		if ($(this).attr("checked") == true) {
			$(this).val("modify");
			label.html("更新时间：");
		} else {
			$(this).val("create");
			label.html("创建时间：");
		}
	});
	
	$("select[id^='status_s']:visible").multiselect({
		minWidth: 140,
		selectedList: 4
	}).multiselect("uncheckAll");
		
	$("input[id^='button_find']:visible").click(function() {
		// post_find(this.form);
		$.getJSON('finance.php?do=SalaryMy.auth', function(json) {
			if (json.status == 1) {
				post_find();
			} else {
				var s = prompt("请输入查询密码");
				if (s == null || s == '') {
					return;
				}
				
				var body = {};
				body.password = s;
				var r = $.getJSON('finance.php?do=SalaryMy.login', body, function(json) {
					if (json.status == 1) {
						post_find();
					} else {
						alert("密码错误，请重新输入！");
					}
				});
			}
		});
	});
});

function auth() {
	var ret = false;
	
	
	alert(ret);
}

function password() {
	var ret = false;
	
	
	return ret;
}
